//#ifndef ERF_HPP
//#define ERF_HPP
#define a1 0.7478556
#define a2 -0.0958798
#define a3 0.3480242
#define p1 0.47047

	inline double Erfm(double x)
	{
		double res;
		if(x<0)
		{
			x=-x;
			double t=(double)1/(1+p1*x);
			res=-(1-a1*t-a2*t*t-a3*t*t*t)*exp(-x*x);
		}else{
			double t=(double)1/(1+p1*x);
			res=(1-a1*t-a2*t*t-a3*t*t*t)*exp(-x*x);
		}
		return res;
	}
//#endif
